/**
 * MVR设备租赁平台 - API配置文件
 * 统一管理API相关配置
 */

// API配置文件
export const API_CONFIG = {
  // 基础配置
  BASE_URL: 'https://api.ezubei.cn',
  // BASE_URL: 'http://localhost:3001',
  TIMEOUT: 10000,
  
  // 响应状态码
  STATUS_CODES: {
    SUCCESS: 200,
    CREATED: 201,
    UNAUTHORIZED: 401,
    FORBIDDEN: 403,
    NOT_FOUND: 404,
    SERVER_ERROR: 500
  },
  
  // 存储键名
  STORAGE_KEYS: {
    TOKEN: 'token',
    REFRESH_TOKEN: 'refresh_token',
    USER_INFO: 'user_info'
  }
}

// 用户状态枚举
export const USER_STATUS = {
  ACTIVE: 'ACTIVE',
  INACTIVE: 'INACTIVE', 
  BANNED: 'BANNED'
}

// 用户角色枚举
export const USER_ROLE = {
  USER: 'USER',
  SUPER_ADMIN: 'SUPER_ADMIN',
  OPERATION_ADMIN: 'OPERATION_ADMIN',
  SERVICE_ADMIN: 'SERVICE_ADMIN',
  FINANCE_ADMIN: 'FINANCE_ADMIN'
}

// 设备状态枚举
export const DEVICE_STATUS = {
  AVAILABLE: 'AVAILABLE',
  RENTED: 'RENTED',
  MAINTENANCE: 'MAINTENANCE',
  OFFLINE: 'OFFLINE'
}

// 订单状态枚举
export const ORDER_STATUS = {
  DRAFT: 'DRAFT',
  SUBMITTED: 'SUBMITTED',
  PAYMENT_PENDING: 'PAYMENT_PENDING',
  CONFIRMED: 'CONFIRMED',
  IN_DELIVERY: 'IN_DELIVERY',
  DELIVERED: 'DELIVERED',
  IN_USE: 'IN_USE',
  RETURNED: 'RETURNED',
  COMPLETED: 'COMPLETED',
  CANCELLED: 'CANCELLED'
}

// API端点
export const API_ENDPOINTS = {
  // 认证相关
  AUTH: {
    REGISTER: '/auth/register',
    LOGIN: '/auth/login',
    SMS_LOGIN: '/auth/sms-login',
    REFRESH: '/auth/refresh',
    LOGOUT: '/auth/logout'
  },

  // 短信相关
  	SMS: {
		SEND: '/sms/send',
		VERIFY: '/sms/verify',
		STATUS: '/sms/status'
	},
	
	BANNER: {
		ACTIVE: '/banners/active',
		LIST: '/banners'
	},
  
  // 用户相关
  USERS: {
    PROFILE: '/users/profile',
    UPDATE_PROFILE: '/users/profile',
    CHANGE_PASSWORD: '/users/change-password',
    SUBMIT_VERIFICATION: '/users/verification'
  },
  
  // 设备相关
  DEVICES: {
    LIST: '/devices',
    DETAIL: '/devices',
    CREATE: '/devices',
    UPDATE: '/devices',
    DELETE: '/devices',
    SEARCH: '/devices/search'
  },
  
  // 订单相关
  ORDERS: {
    LIST: '/orders/my-orders',
    DETAIL: '/orders',
    CREATE: '/orders',
    UPDATE: '/orders',
    DELETE: '/orders',
    MY_ORDERS: '/orders/my-orders',
    UPLOAD_REQUIREMENTS: '/orders/upload-requirements'
  },
  
  // 收藏相关
  FAVORITES: {
    LIST: '/favorites',
    ADD: '/favorites',
    REMOVE: '/favorites'
  }
} 